package com.yhb.yinsheng.flow;

import com.yhb.yinsheng.model.ExecutionFlow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UnionPayExecutionFlowMapper {
    int insert(
            @Param("executionFlow") ExecutionFlow executionFlow,
            @Param("dateString") String dateString
    );

    ExecutionFlow getExecutionFlowById(
            @Param("id") String id,
            @Param("dateString") String dateString
    );

    ExecutionFlow getExecutionFlowByRequestId(
            @Param("requestId") String requestId,
            @Param("dateString") String dateString
    );

    int updateExecutionFlow(
            @Param("executionFlow") ExecutionFlow executionFlow,
            @Param("dateString") String dateString
    );

    int updateExecutionFlowByRequestId(
            @Param("executionFlow") ExecutionFlow executionFlow,
            @Param("dateString") String dateString
    );

    List<ExecutionFlow> getFlowByUserIdAndDateString(
            @Param("userId") String userId,
            @Param("dateString") String dateString
    );

    List<ExecutionFlow> getSucceedFlowsOfUserAndDateString(
            @Param("userId") String userId,
            @Param("dateString") String dateString
    );

    List<ExecutionFlow> getSucceedPayFlowsOfUserAndDateString(
            @Param("userId") String userId,
            @Param("dateString") String dateString
    );

    List<ExecutionFlow> getSucceedPayFlowsAndDateString(
            @Param("dateString") String dateString
    );
    List<ExecutionFlow> getPendingFlowsOfDateString(
            @Param("dateString") String dateString
    );

//    int

//    String makeFlowSuccess(
//            @Param("id") String id,
//            @Param("dateString") String dateString
//    );
//
//    String makeFlowFail(
//            @Param("id") String id,
//            @Param("dateString") String dateString
//    );
}
